#include"processBar.h"
#include<string.h>
#include<unistd.h>

const char* label = "|/-\\";

void processbar()
{
  char bar[NUM];
  memset(bar,'\0',sizeof(bar));
  int cnt = 0;
  while(cnt <= 100)
  {
    printf("[%-100s][%d%%][%c]\r", bar, cnt, label[cnt%4]);
    fflush(stdout);
    bar[cnt++] = STYLE;
    if(cnt < 100)
    {
      bar[cnt] = '>';
    }
   // printf(">");
    usleep(100000);
  }
  printf("\n");
}
